import 'package:base_flutter/base_flutter.dart';
import 'package:flutter/src/widgets/framework.dart';

import '../../model/iot/iot_model.dart';
import '../../net/response/iot/smart_equipment_data.dart';

class IotListViewModel extends BaseListViewModel<SmartEquipmentData> {
  IotListViewModel(BuildContext context) : super(context);

  var model = IotModel();

  @override
  Future<List<SmartEquipmentData>> requestListData() async {
    return await model.getEquipmentList(page: page, rows: pageLength);
  }

  @override
  void onCreated() {
    super.onCreated();
    requestRefresh();
  }
}
